home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #11
/
Amiga Plus CD - 2004 - No. 11.iso
/
AmiSoft
/
Dev
/
basic
/
blitzgtfix.lha
/
BlitzGTFix
/
BBGTLib_Examples
/
gtlistview.bb2
< prev
next >
Wrap
Text File
|
2002-01-27
|
1KB
|
60 lines
WbToScreen 3
Use Screen 3
LoadFont 2,"topaz.font",8
Use IntuiFont 2
; DONT USE COMMANDS WHICH USE A3 AS A PARAMETER DIRECTLY WITH HEX$
; COS IT GOES SCREWY
NEWTYPE.gtlv_item
pad.w
text$
End NEWTYPE
Dim List dummy.gtlv_item(10)
While AddItem(dummy())
dummy()\text = String$(Chr$(Rnd(26)+65),5+Rnd(5))
Wend
foo.l=GTListView(0,1,20,20,80,50,"Normal",#PLACETEXT_ABOVE,dummy())
NPrint Hex$(foo)
foo.l=GTListView(0,2,130,20,80,50,"Disabled (OS3+)",#PLACETEXT_ABOVE|$40,dummy())
NPrint Hex$(foo)
foo.l=GTListView(0,3,240,20,80,50,"Read only",#PLACETEXT_ABOVE|$1000,dummy())
NPrint Hex$(foo)
GTTags #GTLV_ShowSelected,0
foo.l=GTListView(0,4,350,20,80,50,"Selected",#PLACETEXT_ABOVE,dummy(),2)
NPrint Hex$(foo)
GTTags #GTLV_ShowSelected,0
foo.l=GTListView(0,5,460,20,80,50,"Selected+Top",#PLACETEXT_ABOVE,dummy(),4,1)
NPrint Hex$(foo)
GTNewLookProp On
foo.l=GTListView(0,6,20,100,80,50,"NewLookProp",#PLACETEXT_ABOVE,dummy())
NPrint Hex$(foo)
AddIDCMP #LISTVIEWIDCMP
Window 0,0,0,600,300,$100f,"jjlk",-1,-1
DefaultOutput
AttachGTList 0,0
While ev.l<>#IDCMP_CLOSEWINDOW
ev.l=WaitEvent
Select ev
Case #IDCMP_GADGETUP
NPrint "Listview ",GadgetHit," hit, item number ",EventCode
End Select
Wend
DetachGTList 0
End